Class 10 Agenda:
Class 9 IDP Uganda Suitability submissions:
Review of Class 10 OSM Assignment:
QUICK OSM
Quick Map Services
Quick OSM Interface
Key Value Combinations
Overpass API Queries:
Overpass Queries within QuickOSM Plugin
OSM_ID in Quick OSM
OSM_ID in OSM
Changeset + ID
Changeset
Introduction to Overpass Turbo:
Overpass Turbo is a web-based data filtering tool for OpenStreetMap.
With overpass turbo you can run Overpass API queries and analyse the resulting OSM data interactively on a map. There is an integrated Wizard which helps build queries. Information on Overpass query language and protocols can be found in the OSM wiki for the API - Language Guide
The Interface features a main menu located at the top of the browser window as follows:
Overpass Turbo Interface
Important functions at the main menu include Run,Wizard, Export and Save + Load:
Run - after a query is logged into the query window located left panel, enacting this function runs the query on the OSM database and returns highlighted features if the query is successful. If the query is not sucessful, error warnings will result and can be utilized to troubleshoot the syntax of the error query.
Query Wizard - ideal location to start forming a query. Once created, the query can be enacted by Run in the query window:
Query Wizard
Export:Export Queries
Save and Load:Save and Load Queries
Save and Load Queries
Practice Query #1:
Using the OSM tag Tag:amenity=drinking_water, set the bounding box to a larger scale geography featuring Lower Manhattan generally. Enact Wizard and search for Drinking Water followed by build and run query:
Drinking Water Query
Practice Query #2:
OSM data is composed of 3 core Elements, essentially the building blocks of its conceptual model of the world. These are Way, Node and Relation. An overview of all the Elements is available on the OSM Wiki Elements page. In the following query, only return Way elements within the key for highway which is structured as `highway=*:
Highway + Way Query
Practice Query #3:
All queries by default are geographically bound by the map browser frame bounding box. This default can be overriden by replacing the default {{bbox}} with (lat_min, lon_min, lat_max, lon_max) as follows for any/all included Elements:
/*
This has been generated by the overpass-turbo wizard.
The original search was:
“"fire hydrant"”
*/
[out:json][timeout:25];
// gather results
(
// query part for: “"fire hydrant"”
node["emergency"="fire_hydrant"](40.699544,-74.020386,40.710280,-74.002876);
);
// print results
out body;
>;
out skel qt;
Practice Query #4:
Queries can also be styled. In the following, Parks are returned with specified stlying:
/*
This has been generated by the overpass-turbo wizard.
The original search was:
“leisure=playground and access!=no and access!=private”
*/
[out:json][timeout:25];
// gather results
(
// query part for: “leisure=playground and access!=no and access!=private”
node["leisure"="playground"]["access"!="no"]["access"!="private"]({{bbox}});
way["leisure"="playground"]["access"!="no"]["access"!="private"]({{bbox}});
relation["leisure"="playground"]["access"!="no"]["access"!="private"]({{bbox}});
);
// print results
out body;
>;
out skel qt;
{{style:
way{
color: green;
fill-color: green;
text: name:en;
}
node{
color: green;
fill-color: green;
text: name:en;
}
relation{
color: navy;
fill-color: green;
text: name:en;
}
relation node, relation way, relation relation {
color: green;
fill-color: green;
}
}}
Practice Query #5:
The ‘everything’ Query:
[out:json][timeout:25];
(
node({{bbox}});
way({{bbox}});
relation({{bbox}});
);
out body;
>;
out skel qt;
**Practice Query #6:
Returing to the original OSM Query for New York, the following Query returns explicit ID:
/*
This query looks for a node, way or relation
with the given id.
*/
[out:json][timeout:25];
// gather results
(
// query part for: “id:175905”
relation(175905);
);
// print results
out body;
>;
out skel qt;